@import "../globalstyle.less";

.dy-cascader {
  position: relative;
  margin-bottom: 20px;
  input {
    z-index: 1;
  }
  label {
    display: block;
    flex: 1;
    font-size: 14px;
  }

  .input-wrapper {
    position: relative;
    box-sizing: border-box;
    input {
      position: relative;
      z-index: 1;
      width: 100%;
      box-sizing: border-box;
    }
  }
  .dy-cascader-arrow {
    display: block;
    position: absolute;
    width: 30px;
    height: 100%;
    right: 0px;
    top: 0px;
    background: @dy-arrow-bg-color;
    border-radius: 0 2px 2px 0;
    z-index: 0;
    // transition: transform .3s;
  }

  .dy-cascader-arrow:before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 7px;
    height: 0;
    width: 0;
    border: 8px solid;
    margin-top: -4px;
    border-color: @dy-arrow-color transparent transparent transparent;
  }

  .dy-cascader-arrow:after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 7px;
    width: 0;
    height: 0;
    border: 8px solid;
    margin-top: -5px;
    border-color: @dy-arrow-bg-color transparent transparent transparent;
  }

  .dy-cascader-select {
    width: 100%;
    position: absolute;
    z-index: 9;
    top: 32px;
    overflow: auto;
    right: 0;
    background: @dy-select-bg-color;
    border-radius: 0 0 2px 2px;
    outline: none;

    .dy-cascader-select_left,
    .dy-cascader-select_right {
      min-height: 200px;
      max-height: 400px;
      overflow: auto;
      flex: 1.5;
      border-right: 1px solid @dy-deep-color;
      padding: 5px;

      .dy-cascader-options {
        cursor: pointer;
        height: 25px;
        line-height: 25px;
        padding: 0 5px;
        border-bottom: 1px solid @dy-select-font-color;
        color: @dy-select-font-color;
        &:hover {
          background: @dy-base-hover-bgcolor;
          color: @dy-base-hover-ftcolor;
        }
      }
    }

    .dy-cascader-select_right {
      border: none;
      flex: 1;
    }
  }

  .dy-cascader-label {
    width: 100%;
    box-sizing: border-box;
    display: block;
    position: absolute;
    line-height: 30px;
    height: 30px;
    padding: 0 5px;
    top: 1px;
    right: 0;
    font-size: 14px;
  }

  .arrow-right {
    position: relative;
  }

  .arrow-right:before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 0;
    width: 0;
    height: 0;
    border: 6px solid;
    margin-top: -6.25px;
    border-color: transparent transparent transparent @dy-arrow-color;
  }

  .arrow-right:after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 2px;
    width: 0;
    height: 0;
    border: 6px solid;
    margin-top: -6.25px;
    border-color: transparent transparent transparent @dy-select-bg-color;
  }
}
